package cn.neusoft.feignClients;

import cn.neusoft.domain.Order1;
import cn.neusoft.interceptor.FeignInterceptor;
import cn.neusoft.query.OrderQuery;
import cn.neusoft.vo.ResultBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "customer-server", configuration = FeignInterceptor.class)
public interface OrderFeignClient {
    // 根据条件查询单个订单
    @PostMapping("/order/findByCondition")
    ResultBean<Order1> findOrderByCondition(@RequestBody OrderQuery orderQuery);

    // 修改订单状态
    @PutMapping("/order/updateStatus")
    ResultBean updateOrderStatus(@RequestBody Order1 order);


    // 分页模糊查询订单
    @PostMapping("/order/page2")
    ResultBean findOrderByPage(@RequestBody OrderQuery orderQuery);
}
